package lobysocket
{
	import flash.events.Event;
	
	public class SocketManager
	{
		private var socket:SocketRequestState = null;
		
		public function SocketManager()
		{
		}
		
		//		public static function get Instance():StateManager
		//		{
		//			if(instance == null)
		//				instance = new StateManager();
		//			return instance;
		//		}
		
		public function changeSocket(socket:SocketRequestState):void
		{
			this.socket = socket;
		}
		
		public function send():void
		{
			if(socket != null)
				socket.send(this);
		}
		public function receive(obj:Object):void
		{
			if(socket != null)
				socket.receive(obj);
		} 
		public function fault(event:Event):void
		{
			if(socket != null)
				socket.fault(event);
		}
	}
}